<?php
include 'secure/core.php';
include 'user_header.php';
include 'left.php';
$fileid = mysql_real_escape_string($_GET['file']);  
?>
		<div id="right">				
			<div class="section">
			<?php if(isset($fileid) and $files->FileExists($fileid)){?>
								<div class="box">
					<div class="title">
						General statistics for <strong><?php echo $files->getFileName($fileid);?></strong>
						<span class="hide"></span>
					</div>

					<div class="content">
						<table cellspacing="0" cellpadding="0" border="0"> 
							<thead> 
								<tr>
									<th>Visitors</th>
									<th>Downloads</th>
									<th>Earnings</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td><?php echo $files->getTotalVisits($fileid);?></td>
									<td><?php echo $files->getUsersFileDownloads($fileid); ?></td>
									<td>$<?php echo $earnings->getFileTotalEarnings($fileid); ?></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="box">
					<div class="title">
						Countries statistics for <strong><?php echo $files->getFileName($fileid);?></strong>
						<span class="hide"></span>
					</div>
					<div class="content">
						<div class="message blue"><span><b>Information</b>: This feature will be available soon.</span></div></br>
					</div>
				</div>
				<?php } else { ?>
				<div class="message blue"><span><b>Information</b>: The file you're looking for cannot be found.</span></div>
				<?php } ?>
			</div>
		</div>
<?php include 'footer.php'; ?>